package cn.edu.bjtu.toychange.service.impl;

import java.util.ArrayList;

import cn.edu.bjtu.toychange.dao.ToyDao;
import cn.edu.bjtu.toychange.dao.support.SearchCondition;
import cn.edu.bjtu.toychange.entity.Toy;
import cn.edu.bjtu.toychange.service.ToyListService;

public class ToyListServiceImpl implements ToyListService{
	private ToyDao toyDao;
	
	public ToyListServiceImpl() {
		toyDao = new ToyDao();
	}
	
	@Override
	public ArrayList<Toy> getAllToys() {
		// TODO Auto-generated method stub
		
		return toyDao.getAllToys();
	}

	@Override
	public ArrayList<Toy> getAvailToys(int userID) {
		// TODO Auto-generated method stub
		
		return toyDao.getAvailToys(userID);
	}

	@Override
	public ArrayList<Toy> getToysbyType(int type) {
		// TODO Auto-generated method stub
		
		return toyDao.getToysByType(type);
	}

	@Override
	public ArrayList<Toy> getRandomToy() {
		// TODO Auto-generated method stub
		
		return toyDao.getRandomToy();
	}

	@Override
	public ArrayList<Toy> getUserAllToys(int userID) {
		// TODO Auto-generated method stub
		
		return toyDao.getUserAllToys(userID);
	}

	@Override
	public ArrayList<Toy> searchToys(SearchCondition searchCondition) {
		// TODO Auto-generated method stub
		
		return toyDao.searchToys(searchCondition);
	}
}
